//
//  FPMeHeaderView.m
//  FinanceProject
//
//  Created by 陈显摆 on 2025/1/21.
//

#import "FPMeHeaderView.h"

@implementation FPMeHeaderView

- (void)awakeFromNib {
    
    [super awakeFromNib];
    
    self.bottomView.clipsToBounds = YES;
    self.bottomView.layer.cornerRadius = 8.f;
    
    self.lab1.textColor = [UIColor hexColor:@"#3A3A3A"];
    self.lab2.textColor = [UIColor hexColor:@"#6A6A6A"];
    
//    self.repayRecordListLab.textColor = [UIColor hexColor:@"#3A3A3A"];
    
    
    self.borrowingInfoView.clipsToBounds = YES;
    self.borrowingInfoView.layer.cornerRadius = 8.f;
    
    self.repayTipLab.textColor = [UIColor hexColor:@"#3A3A3A"];
    self.repayAmountLab.textColor = [UIColor hexColor:@"#000000"];
    self.repayAmountMarkLab.textColor = [UIColor hexColor:@"#000000"];
    self.repayTimeTipLab.textColor = [UIColor hexColor:@"#6A6A6A"];
    
    
    self.repayRecordListLab.clipsToBounds = YES;
    self.repayRecordListLab.layer.borderWidth = 1.f;
    self.repayRecordListLab.layer.borderColor = MAIN_BLUE_COLOR.CGColor;
    self.repayRecordListLab.textColor = MAIN_BLUE_COLOR;
    self.repayRecordListLab.layer.cornerRadius = 12.5f;
    
    
    self.repayBtn.clipsToBounds = YES;
    self.repayBtn.backgroundColor = MAIN_BLUE_COLOR;
    [self.repayBtn setTitleColor:UIColor.whiteColor forState:(UIControlStateNormal)];
    self.repayBtn.layer.cornerRadius = 12.5f;
    
    self.repayTipLab.text = @"本月待还";
    
    self.infoLab1.textColor = [UIColor hexColor:@"#3A3A3A"];
    self.infoLab2.textColor = [UIColor hexColor:@"#3A3A3A"];
    self.infoLab3.textColor = [UIColor hexColor:@"#3A3A3A"];
    
    self.infoTipLab1.textColor = [UIColor hexColor:@"#6A6A6A"];
    self.infoTipLab2.textColor = [UIColor hexColor:@"#6A6A6A"];
    self.infoTipLab3.textColor = [UIColor hexColor:@"#6A6A6A"];
    
    self.view1TipLab.textColor = [UIColor hexColor:@"#3A3A3A"];
    self.view2TipLab.textColor = [UIColor hexColor:@"#3A3A3A"];
    self.view3TipLab.textColor = [UIColor hexColor:@"#3A3A3A"];
    
#warning 大改
    [self showRepayDetailInfo:NO];
}

- (void)showRepayDetailInfo:(BOOL)hasRepayList {
    
    return;
//    NSDate *date = [NSDate date];
//    self.repayTipLab.text = [NSString stringWithFormat:@"%zd月待还", date.month];
    
    if (hasRepayList) {
        
        self.repayBtn.hidden = NO;
        self.repayAmountLab.hidden = NO;
        self.repayAmountMarkLab.hidden = NO;
        self.repayTimeTipLab.hidden = NO;
    }
    else {
        
        self.repayBtn.hidden = YES;
        self.repayAmountLab.hidden = YES;
        self.repayAmountMarkLab.hidden = YES;
        self.repayTimeTipLab.hidden = YES;
    }
}

@end
